{% extends "NuitInfo2013MainBundle::layout.html.twig" %}

{% block body %}
	<form id="recherche">
      <fieldset>
        <legend>Search:</legend>
        <input type="text" value="Rechercher une catégorie &hellip;" onFocus="this.value=(this.value='Rechercher une catégorie &hellip;')? this.value='' : this.value ;">
        <input type="submit" id="sf_submit" name="sf_submit" value="Rechercher" class="button small orange">
      </fieldset>
	</form>
<div class="clear"></div>
<br>
<!-- ################################################################################################ -->
    <div class="three_quarter first">       
        <div id="gallery">
            <section>
                <figure>
                    <ul id="listCategorie" class="clear"></ul>
                  </figure>
              </section>
          </div>
       </div>
    <!-- ################################################################################################ -->
        <!-- ################################################################################################ -->
    <div id="sidebar_1" class="sidebar one_quarter">
      <aside>
        <!-- ########################################################################################## -->
        <h2>Side Navigation</h2>
        <nav>
          <ul>
            <li><a href="http://www.os-templates.com/free-responsive-templates">Free Website Templates</a></li>
            <li><a href="http://www.os-templates.com/free-responsive-templates">Free CSS Templates</a>
              <ul>
                <li><a href="http://www.os-templates.com/free-responsive-templates">Free XHTML Templates</a></li>
                <li><a href="http://www.os-templates.com/free-responsive-templates">Free Web Templates</a></li>
              </ul>
            </li>
            <li><a href="http://www.os-templates.com/free-responsive-templates">Free Website Layouts</a>
              <ul>
                <li><a href="http://www.os-templates.com/free-responsive-templates">Free HTML 5 Templates</a></li>
                <li><a href="http://www.os-templates.com/free-responsive-templates">Free Webdesign Templates</a>
                  <ul>
                    <li><a href="http://www.os-templates.com/free-responsive-templates">Free FireWorks Templates</a></li>
                    <li><a href="http://www.os-templates.com/free-responsive-templates">Free PNG Templates</a></li>
                  </ul>
                </li>
              </ul>
            </li>
            <li><a href="http://www.os-templates.com/free-responsive-templates">Free Responsive Templates</a></li>
          </ul>
        </nav>
        <!-- /nav -->
        <section>
          <h2>Get In Contact</h2>
          <address>
          Full Name<br>
          Address Line 1<br>
          Address Line 2<br>
          Town/City<br>
          Postcode/Zip<br>
          <br>
          Tel: xxxx xxxx xxxxxx<br>
          Email: <a href="http://www.os-templates.com/free-responsive-templates">contact@domain.com</a>
          </address>
        </section>
        <!-- /section -->
        <section>
          <article>
            <h2>Lorem ipsum dolor</h2>
            <p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed.</p>
            <ul class="list indent disc">
              <li><a href="http://www.os-templates.com/free-responsive-templates">Lorem ipsum dolor sit</a></li>
              <li>Etiam vel sapien et</li>
              <li><a href="http://www.os-templates.com/free-responsive-templates">Etiam vel sapien et</a></li>
            </ul>
            <p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed. Condimentumsantincidunt dui mattis magna intesque purus orci augue lor nibh.</p>
            <p class="more"><a href="http://www.os-templates.com/free-responsive-templates">Continue Reading »</a></p>
          </article>
        </section>
        <!-- /section -->
        <!-- ########################################################################################## -->
      </aside>
    </div>
    <div class="clear"></div>
<script>

$.getJSON('{{asset('shopping/shopping.php?query=category')}}', function( data ) {
	var items = [];
	var i = 0;
	$.each( data, function( key, val ) {
		items.push('<li class="one_third '+(i==0 ? 'first' : '')+'"><a href="#"><img src="../images/demo/gallery.gif" alt="">'+val.nom+'</a></li>');
		i++;
		if(i == 3) {
			items.push('<br/>');
			i = 0;
		}
	});
	$('#listCategorie').append(items.join(''));
});
</script>
{% endblock %}